<template>
  <div>
    <div class="login" :class="{portraitLogin:isLogin}">
      <router-link v-if="!isLogin" to="/login" tag="span">登录</router-link>
      <span v-if="isLogin">我是用户头像</span>
    </div>
    <hr>
    <div>
      一起学习vue-router
    </div>
    <hr>
    <div>
      <router-link to="/project">我的项目</router-link>
      <hr>
      <router-link to="/doc">我的文档</router-link>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Home',
  props: {
    msg: String
  },
  data () {
    return {
      isLogin: false
    }
  },
  created () {
    const info = this.$local.fetch('I CAN')
    this.isLogin = info.login
  }
}
</script>
